import request from '@/utils/request'
export function queryPageAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/queryPage',
    method: 'post',
    data
  })
}
export function updateStateAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/updateStatus',
    method: 'post',
    data
  })
}
export function delAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/deleteById',
    method: 'post',
    data
  })
}
export function updateAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/update',
    method: 'post',
    data
  })
}
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/insert',
    method: 'post',
    data
  })
}
export function getAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/integralConfig/get',
    method: 'post',
    data
  })
}
export function getDictByCode(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'post',
    data
  })
}

/** 荣誉start*****/
export function queryHonor(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/taskAchievementConfig/query',
    method: 'post',
    data
  })
}

/**
 * 查询荣誉列表
 * @param {*} data
 */
export function proofList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/honorManage/queryPage',
    method: 'post',
    data
  })
}

export function honorInsert(type, data) {
  const url = type === 'c' ? '/backend/taskAchievementConfig/insert' : '/backend/taskAchievementConfig/update'
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: url,
    method: 'post',
    data
  })
}

/**
 *删除
 * @param data
 * @returns {*}
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/taskAchievementConfig/deleteById',
    method: 'post',
    data
  })
}
